﻿namespace PortableRiotGames.Interfaces.Summoner
{
    using PortableRiotGames.Infrastructure;
    using System.Collections.Generic;

    public class GetSummonerRequest : RequestBase
    {
        public GetSummonerRequest(string key)
            : base(key)
        {
        }

        public long SummonerID { get; set; }

        public string SummonerName { get; set; }

        protected internal override string EndpointUrl
        {
            get
            {
                var value = string.Empty;
                if (!string.IsNullOrEmpty(SummonerName))
                {
                    value = "by-name/" + SummonerName;
                }
                else
                {
                    value = SummonerID.ToString();
                }

                return base.EndpointUrl + string.Format("v1.2/summoner/{0}", value);
            }
        }

        protected internal override List<Region> SupportedRegions
        {
            get { return new List<Region>() { Region.NA, Region.EUNE, Region.EUW }; }
        }
    }
}